<?php

class Zhishidi_Express_Block_Adminhtml_Group_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form {

    protected function _prepareForm() {
        $form = new Varien_Data_Form();
        $this->setForm($form);
        $fieldset = $form->addFieldset('expressGroupFieldset', array('legend' => Mage::helper('zhishidi_express')->__("Express Group information")));

        $fieldset->addField('group_name', 'text', array(
            'name' => 'group_name',
            'label' => Mage::helper('zhishidi_express')->__('Type Code'),
            'title' => Mage::helper('zhishidi_express')->__('Type Code'),
             'required' => true,
        ));



        $fieldset->addField('group_status', 'select', array(
            'name' => 'group_status',
            'label' => Mage::helper('zhishidi_express')->__('Status'),
            'title' => Mage::helper('zhishidi_express')->__('Status'),
            'required' => true,
            'values' => array(
                array(
                    'value' => 'public',
                    'label' => Mage::helper('zhishidi_express')->__('Public'),
                ),
                array(
                    'value' => 'hidden',
                    'label' => Mage::helper('zhishidi_express')->__('Hidden'),
                )
            ),
        ));

        if (Mage::getSingleton('adminhtml/session')->getExpressGroupData()) {
            $form->setValues(Mage::getSingleton('adminhtml/session')->getExpressGroupData());
            Mage::getSingleton('adminhtml/session')->setExpressGroupData(null);
        } elseif (Mage::registry('express_group_data')) {
            $form->setValues(Mage::registry('express_group_data')->getData());
        }
        return parent::_prepareForm();
    }

}